

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeNone',
    swing: function (b) {
        //var a = Math.PI, b = Math.pow, g = Math.sin;
        //return -Math.cos(b * a) / 2 + 0.5;
        return jQuery.easing[jQuery.easing.def](b);
    },
    easeNone: function (a) {
        //var a = Math.PI;
        return a
    },
    easeIn: function (a) {
        //var a = Math.PI;
        return a * a
    },
    easeOut: function (a) {
        //var a = Math.PI;
        return (2 - a) * a
    },
    easeBoth: function (a) {
        //var a = Math.PI;
        return 1 > (a *= 2) ? 0.5 * a * a : 0.5 * (1 - --a * (a - 2))
    },
    easeInStrong: function (a) {
        //var a = Math.PI;
        return a * a * a * a
    },
    easeOutStrong: function (a) {
        //var a = Math.PI;
        return 1 - --a * a * a * a
    },
    easeBothStrong: function (a) {
        //var a = Math.PI;
        return 1 > (a *= 2) ? 0.5 * a * a * a * a : 0.5 * (2 - (a -= 2) * a * a * a)
    },
    elasticIn: function (j) {
        var a = Math.PI,b = Math.pow, g = Math.sin;
        return 0 === j || 1 === j ? j : -(b(2, 10 * (j -=
                1)) * g((j - 0.075) * 2 * a / 0.3))
    },
    elasticOut: function (j) {
        var a = Math.PI,b = Math.pow, g = Math.sin;
        return 0 === j || 1 === j ? j : b(2, -10 * j) * g((j - 0.075) * 2 * a / 0.3) + 1
    },
    elasticBoth: function (j) {
        var a = Math.PI,b = Math.pow, g = Math.sin;
        return 0 === j || 2 === (j *= 2) ? j : 1 > j ? -0.5 * b(2, 10 * (j -= 1)) * g((j - 0.1125) * 2 * a / 0.45) : 0.5 * b(2, -10 * (j -= 1)) * g((j - 0.1125) * 2 * a / 0.45) + 1
    },
    backIn: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        1 === a && (a -= 0.001);
        return a * a * (2.70158 * a - 1.70158)
    },
    backOut: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        return (a -= 1) * a * (2.70158 * a + 1.70158) + 1
    },
    backBoth: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        var b, g = (b = 2.5949095) + 1;
        return 1 > (a *= 2) ? 0.5 * a * a * (g * a - b) : 0.5 * ((a -= 2) * a * (g * a + b) + 2)
    },
    bounceIn: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        return 1 -
            jQuery.easing.bounceOut(1 - a)
    },
    bounceOut: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        return a < 1 / 2.75 ? 7.5625 * a * a : a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375 : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375
    },
    bounceBoth: function (a) {
        //var a = Math.PI,b = Math.pow, g = Math.sin;
        return 0.5 > a ? 0.5 * jQuery.easing.bounceIn(2 * a) : 0.5 * jQuery.easing.bounceOut(2 * a - 1) + 0.5
    }

});

